# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Alexander Fehr <pizzapunk gmail com>
# Contributor: William Rea <sillywilly@gmail.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=xapian-core
epoch=1
pkgver=1.4.4
pkgrel=1
pkgdesc='Open source search engine library.'
arch=('i686' 'x86_64')
url='http://www.xapian.org/'
license=('GPL')
depends=('util-linux')
# xapian config requires libxapian.la
options=('libtool')
source=("http://oligarchy.co.uk/xapian/${pkgver}/${pkgname}-${pkgver}.tar.xz")
sha512sums=('dc88bab1d82c68b29d51c2113319ddb5d16840f3544b9d5fcc7a3671f97d58f16ddff58b865ad3521ea778cbaacf73fe7346bb514a1275f1f739283a4128d001')

build() {
  # FS#40614
  if [ "${CARCH}" = "i686" ]; then
    SSE2="--disable-sse"
  fi

  cd ${pkgname}-${pkgver}
  ./configure \
    --prefix=/usr ${SSE2}
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}
